// 角色信息接口
export interface RoleInfo {
  id: number
  roleName: string
  roleDesc?: string
  createTime: string
  updateTime: string
  permissions?: number[]
}

// 角色搜索参数接口
export interface RoleSearchParams {
  page: number
  limit: number
  roleName?: string
  startTime?: string
  endTime?: string
}

// 角色表单数据接口
export interface RoleFormData {
  id?: number
  roleName: string
  roleDesc?: string
  permissions?: number[]
}

// 权限信息接口
export interface PermissionInfo {
  id: number
  permissionName: string
  permissionCode: string
  parentId: number
  type: 'menu' | 'button'
  children?: PermissionInfo[]
}

// API响应接口
export interface RoleResponseData {
  code: number
  message: string
  data: {
    list: RoleInfo[]
    total: number
  }
}

export interface SingleRoleResponseData {
  code: number
  message: string
  data: RoleInfo
}

export interface PermissionResponseData {
  code: number
  message: string
  data: PermissionInfo[]
}

export interface CommonResponseData {
  code: number
  message: string
  data: string
}

export interface RolePermissionsData {
  roleId: number
  permissionIds: number[]
}
